Skip to content

ContractSerializationDefaults (085-002): one authority for contract-seam JSON options#274

Merged
StevenTCramer merged 1 commit into
masterfrom
dev
Jul 2, 2026
Merged

ContractSerializationDefaults (085-002): one authority for contract-seam JSON options#274
StevenTCramer merged 1 commit into
masterfrom
dev

Conversation

@StevenTCramer

Copy link
Copy Markdown
Contributor

Summary

Kanban 085-002 — third inference-removal candidate: the contract-seam serializer options were declared in nine places by convention (the task estimated three). Now there is one: ContractSerializationDefaults in foundation-contracts (shared frozen Options instance + Apply for the DI Configure pattern), referenced by the SPA client, all four timewarp-testing harness variants, both integration-test trees, and the contracts round-trip tests.

Latent inconsistencies the sweep fixed

  • ApiServerTestConvention registered default (PascalCase) options as the api test client's DI singleton — disagreeing with the camelCase seam, masked by case-insensitive deserialization paths.
  • The Person serialization smoke test ran under default options, exercising a configuration the app never uses; it now tests the real seam.

Server side deliberately untouched: ASP.NET Core's Web defaults are camelCase and framework-managed; the canonical type's Design region documents that the seam matches them.

Verification

dev build 0/0 · contracts 7/7 · web-server integration 22 · api-server integration 6 (under corrected options) · analyzers 26 · sourcegen 16

🤖 Generated with Claude Code

…ract-seam JSON options

The camelCase seam options were declared in NINE places by convention (task
estimated three): web-spa program.cs, four copies inside timewarp-testing,
web-spa-integration x3, api-server-integration convention, web-contracts-tests.
All now reference ContractSerializationDefaults (foundation-contracts/types):
a shared Options instance (STJ freezes on first use; no participant mutates)
plus Apply for the DI Configure pattern.

Two latent inconsistencies fixed by the sweep:
- ApiServerTestConvention registered DEFAULT (PascalCase) options as the api
  test client's DI singleton — disagreeing with the seam, masked by
  case-insensitive paths. Now canonical; api integration tests pass.
- The Person serialization smoke test used default options, exercising
  nothing the app actually does. Now runs against the real seam options.

Verified: dev build 0/0; contracts 7, web-server integration 22, api-server
integration 6, analyzers 26, sourcegen 16.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@StevenTCramer StevenTCramer merged commit b5a5509 into master Jul 2, 2026
1 check passed
@StevenTCramer StevenTCramer deleted the dev branch July 2, 2026 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant